Skip to main content

SEARCH

Returns the number of the character at which a specific character or text string is first found, reading left to right (not case-sensitive).

Syntax

expression.SEARCH(arg1, arg2, arg3);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRangeApiNamestring
arg2RequiredApiRangeApiNamestring
arg3RequiredApiRangeApiNamenumber

Returns

number

Example

var oWorksheet = Api.GetActiveSheet();
var oFunction = Api.GetWorksheetFunction();
oWorksheet.GetRange("A1").SetValue(oFunction.SEARCH("line", "Online Office"));